73 WDT_A_hold(WDT_A_BASE);
85 GPIO_setAsPeripheralModuleFunctionInputPin(
87 GPIO_PIN4 + GPIO_PIN5,
88 GPIO_PRIMARY_MODULE_FUNCTION
103 currentTime.Seconds = 0x00;
104 currentTime.Minutes = 0x26;
105 currentTime.Hours = 0x13;
106 currentTime.DayOfWeek = 0x03;
107 currentTime.DayOfMonth = 0x20;
108 currentTime.Month = 0x07;
109 currentTime.Year = 0x2011;
117 RTC_B_initCalendar(RTC_B_BASE,
123 RTC_B_configureCalendarAlarmParam
param = {0};
124 param.minutesAlarm = 0x00;
125 param.hoursAlarm = 0x17;
126 param.dayOfWeekAlarm = RTC_B_ALARMCONDITION_OFF;
127 param.dayOfMonthAlarm = 0x05;
128 RTC_B_configureCalendarAlarm(RTC_B_BASE, &
param);
131 RTC_B_setCalendarEvent(RTC_B_BASE,
132 RTC_B_CALENDAREVENT_MINUTECHANGE);
134 RTC_B_clearInterrupt(RTC_B_BASE,
135 RTC_B_CLOCK_READ_READY_INTERRUPT +
136 RTC_B_TIME_EVENT_INTERRUPT +
137 RTC_B_CLOCK_ALARM_INTERRUPT
142 RTC_B_enableInterrupt(RTC_B_BASE,
143 RTC_B_CLOCK_READ_READY_INTERRUPT +
144 RTC_B_TIME_EVENT_INTERRUPT +
145 RTC_B_CLOCK_ALARM_INTERRUPT
149 RTC_B_startClock(RTC_B_BASE);
152 __bis_SR_register(LPM0_bits + GIE);
156 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
157 #pragma vector=RTC_VECTOR
159 #elif defined(__GNUC__)
160 __attribute__((interrupt(RTC_VECTOR)))
164 switch (__even_in_range(RTCIV,16)){
168 GPIO_toggleOutputOnPin(
177 newTime = RTC_B_getCalendarTime(RTC_B_BASE);
MPU_initThreeSegmentsParam param
volatile Calendar newTime